package com.qianbao.dao.bindcard;


import com.qianbao.domain.bindcard.BankCardEntity;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface BindCardDao {


    /**
     * 查询用户的所有银行卡
     * @param customId
     * @return
     */
    @Select("select * from sys_user_bank_card where custom_id = #{customId}")
    public List<BankCardEntity> findAllBankCard(String customId);


    /**
     * 插入一条银行卡信息
     * @param entity
     * @return
     */
    @Insert("INSERT INTO sys_user_bank_card (card_id,custom_id,name,phone,cardNumber,idNumber) " +
            "VALUES(#{card_id},#{custom_id},#{name},#{phone},#{cardNumber},#{idNumber})")
    public int insertCardInfomation(BankCardEntity entity);



}
